package com.ship.dispatch.mapper.sys;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.dispatch.bean.sys.SysConstant;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author tangshixuan
 * @date 2023-8-30
 */
public interface SysConstantMapper extends BaseMapper<SysConstant> {
    /**
     * 根据常量类型和常量值确定常量名
     * @param type
     * @param constValue
     * @return
     */
    @Select("SELECT const_label FROM constant WHERE type = #{type} AND const_value = #{constValue}")
    String findConstLabel(@Param("type") String type, @Param("constValue") String constValue);
}
